package com.finley.flowabledemo.design.process_respon;

import cn.hutool.core.util.StrUtil;

public abstract class IProcessHandler {

    protected IProcessHandler nextHandler;

    protected void setNextProcessHandler(IProcessHandler nextHandler) {
        this.nextHandler = nextHandler;
    }

    abstract void handler(ZZContext context);

    public void processHandler(ZZContext context) {
        System.out.println(StrUtil.format("工单号:[{}],产品名称:[{}],生产数量:[{}]",
                context.getOrderCode(), context.getProduceName(), context.getQuality()));
        handler(context);
    }

}
